<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-异常兑换列表">
</@frame.head>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/search_table.css" />
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span> 监控管理 <span class="c-gray en">&gt;</span> 异常兑换列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
   <div class="text-c">
    <form action="${contextPath}/monitor/query_monitor_order_list" method="post" name="search_form" id="search_form">
       <input type="hidden" name="page" value="${pagination.pageNo}"  id="page" />  
       <table class="table search_table" >
          <tr>  
           <td>订单号：</td>
           <td><input type="text" class="input-text  radius"  placeholder="请输入订单号" name="orderNo" value="${monitorOrderQo.orderNo}"  onkeyup="this.value=this.value.replace(/[^\d]/g,'') " >
           </td>  
           <td>会员卡号：</td> 
           <td><input type="text" class="input-text  radius"  placeholder="请输入会员卡号" name="memberNo" value="${monitorOrderQo.memberNo}"  onkeyup="this.value=this.value.replace(/[^\d]/g,'') " >
           </td>  
           <td>商品类型：</td> 
           <td>
           <span class="select-box radius">
           <select class="select"  name="productType" >
            <option value>请选择类型</option>
            <option  value="1" <#if monitorOrderQo.productType=1>selected="selected"</#if>>实体商品</option>
            <option  value="2" <#if monitorOrderQo.productType=2>selected="selected"</#if>>虚拟商品</option>
            <option  value="3" <#if monitorOrderQo.productType=3>selected="selected"</#if>>机票优惠券</option>
           </select>
           </span>         
           </td>
          </tr>
          <tr>
           <td>状态：</td> 
           <td>
           <span class="select-box radius">
           <select class="select"  name="state" >
           <option value>全部</option>
            <option  value="2" <#if monitorOrderQo.state=2>selected="selected"</#if>>已处理</option>
            <option  value="1" <#if monitorOrderQo.state=1>selected="selected"</#if>>未处理</option>
            <option  value="3" <#if monitorOrderQo.state=3>selected="selected"</#if>>非实物商品，不需要处理</option>
           </select>
           </span>
           </td>  
           <td>下单时间：</td>
           <td style="padding: 0px;">
             <table style="padding: 0px;margin: 0px;">
               <tr>
                 <td style="width: 48%;">
                   <input type="text" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'endDate\')}',readOnly: true })" id="startDate" 
                   value='${(monitorOrderQo.beginDate?string("yyyy-MM-dd"))!}' name="beginDate" class="input-text Wdate"/>
                 </td>
                 <td style="width: 4%;"> 至</td>
                 <td style="width: 48%;">
                   <input type="text" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'startDate\')}',readOnly: true })" id="endDate" 
                   value='${(monitorOrderQo.endDate?string("yyyy-MM-dd"))!}' name="endDate"  class="input-text Wdate"/>
                 </td>
               </tr>
             </table>
           </td>
           <td></td>
           <td>
              <input class="btn btn-success radius" type="button" onclick="search();" value="搜索" />
              <input class="btn btn-success radius" type="button" onclick="toIsEmpty();" value="重置" />
              <input class="btn btn-success radius" type="button" onclick="search();" value="刷新" />
           </td>
         </tr>
      </table>
     </form>
    </div>

    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
    <span class="r">共有数据：<strong>${pagination.totalCount}</strong> 条</span> </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr  class="text-c">
            <th width="13%">订单号</th>
            <th width="19%">商品名称</th>
            <th width="8%">商品类型</th>
            <th width="5%">数量</th>
            <th width="10%">订单总额</th>
            <th width="11%">下单时间</th>
            <th width="11%">会员卡号</th>
            <th width="11%">异常原因</th>
            <th width="12%">状态</th>
        </tr>
        </thead>
        <tbody >
         <#list pagination.list as list> 
         <tr  class="text-c">
            <td>${list.orderNo}</td>
            <td>${list.productName}</td>
            <td>
            <#if list.productType=1>实物商品
            <#elseif  list.productType=2>虚拟商品
            <#elseif  list.productType=3>机票优惠券
            </#if>
            </td>
            <td>${list.orderNum}</td>
            <td>${list.allMileages}</td>
            <td>${(list.orderTime?string("yyyy-MM-dd HH:mm:ss"))!}</td>
            <td>${list.memberNo}</td>
            <td>${list.abnormalReason}</td>
            <td>
               <#if list.state=1><span class="label label-danger radius">未处理</span>
               <#elseif list.state=2><span class="label label-success radius">已处理</span>
               <#elseif list.state=3><span class="label radius">非实物商品，不需要处理</span>
               </#if>
            </td>
         </tr>
         </#list>
        </tbody>
    </table>
    <div id="div_page" style="padding-top: 10px;float: right"></div>
</div>
</div>
<@frame.end "default">
</@frame.end>
</html>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript">
var path="${contextPath}";
laypage({
    cont: 'div_page',//容器。值支持id名、原生dom对象，jquery对象。
    pages: ${pagination.totalPage},//通过后台拿到的总页数
    curr:  ${pagination.pageNo} || 1, //当前页
	skip: true, //是否开启跳页
	first: 1, //将首页显示为数字1,。若不显示，设置false即可
	last: ${pagination.totalPage}, //将尾页显示为总页数。若不显示，设置false即可
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
            $("#page").val(obj.curr);
            $("#search_form").submit();
        }
    }
});
function search(){
    $("#page").val("1");
    $("#search_form").submit();
};
function toIsEmpty(){
	document.getElementsByName("orderNo")[0].value = "";
	document.getElementsByName("memberNo")[0].value = "";
	document.getElementsByName("productType")[0].value = "";
	document.getElementsByName("state")[0].value = "";
	$("#startDate").val("");
	$("#endDate").val("");
    $("#page").val("1");
 };
</script>